import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login.vue'
import Main from '../views/Main.vue'
import Users from '../views/user/Users'

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/login'},
  { path: '/login', component: Login },
  { path: '/main', component: Main,
    children:[
      { path: '/users', component: Users, meta:{title:'用户管理'}}
    ]
  },


]

const router = new VueRouter({
  routes
})

export default router
